home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
internet
/
irc_i_dodatki
/
amircurlshow
/
urlshow.amirx
< prev
next >
Wrap
Text File
|
1997-03-21
|
3KB
|
108 lines
/* URLShow script for use with AmIRC 1.x */ Version='1.06'/*
// Written by Deryk Robosson 3.3.97
//
// newlook@ameritech.net newlook on #amiga IRC (EfNet/IRCnet)
//
// 03.03.97 (1.01) Added command template to help
// Suggested by Xcal
// Added LIST support
// Corrected a bug when testing for text
// Corrected problem with saving site, some
// sites are case sensitive.
// 04.03.97 (1.03) Correct problem when parsing the list. A
// search for AT would result in a hit to
// umueller - http://www.lysator.lie.se/
// note the 'AT' in lysator. Bug reported by SimD
// 10.03.97 (1.04) Prettied up the help/ver info a bit
// 18.03.97 (1.05) Cleaned up the code.
// 21.03.97 (1.06) Corrected problem with LIST not working.
*/
bold = d2c(2)
underline = '1F'x
options results
parse arg param
/* data file to be used. edit the path as needed */
datpath = 'amitcp:amirc/rexx/URLShow.dat'
temp = param
param = strip(upper(param))
if param ~= '' then do
parse var param site' 'therest
if command ~= '' then parse var therest command' 'user
end
if param = ''|param='VER' then signal version
if param = 'HELP' then signal help
if param = 'LIST' then signal listsites
if site = 'ADD' then do
parse var temp site' 'therest
if open(file,datpath,'A') then writeln(file,therest);
call echo('Site added.')
call CleanExit()
end
if open(file,datpath,'R') then do
do until eof(file)
line = ReadLn(file)
parse var line name'-'text
if(pos(site,upper(name))) ~= 0 then do
select
when command = 'SAY' then do
'SAY 'line
call CleanExit()
end
when command = 'SHOW' then do
'SAY /NOTICE' user||' '||line
call CleanExit()
end
otherwise
if command = '' then do
call echo(line)
call CleanExit()
end
end
end
end
'ECHO No information on 'site
end
CleanExit:
close(file)
exit
listsites:
if open(file,datpath,'R') then do
do until eof(file)
line = ReadLn(file)
call echo(line)
end
end
exit
version:
call echo(bold'URLShow.AMIRX'bold' Version 'bold||version)
call echo('Read the top of URLShow.AMIRX script for history.')
call echo(bold'©1997'bold' Deryk Robosson 'bold'(newlook)'bold' - [newlook@ameritech.net]')
call echo('Type /<alias> help for command information')
exit
help:
call echo(bold'URLShow.AMIRX'bold' Help')
call echo(bold'ADD - 'bold'Adds a site to the data file')
call echo(bold'SAY - 'bold'ECHOs output to window')
call echo(bold'VER - 'bold'displays script version')
call echo(bold'SHOW - 'bold'displays outout to user')
call echo(bold'HELP - 'bold'displays this file')
call echo(bold'LIST - 'bold'displays entire list')
call echo(bold||underline'EXAMPLES:'bold||underline)
call echo(bold'/URLShow site 'bold'to see output yourself')
call echo(bold'/URLShow site SAY 'bold'to show output to channel')
call echo(bold'/URLShow site SHOW usernick 'bold'to show output to a user')
call echo(bold'/URLShow LIST 'bold'for site list')
exit
echo: procedure
parse arg a
'echo P='d2c(27)'b«URLShow» 'a
return 1